import React from 'react';
import ItemCol from './ItemCol';

export default function Item(props) {
  const { layout } = props;

  // layout :  vertical || Inline
  // layout: vertical垂直 默认 横向

  const RowStyle = {
    display: 'flex',
    alignSelf: 'baseline',
    flexDirection: layout === 'vertical' ? 'column' : 'row',
    boxSizing: 'border-box',
  };

  return <div style={RowStyle}>{props.children}</div>;
}
